﻿using System.Globalization;
using Dark_Core_Server.Models.Article;
using DarkSKL_Core.MongoDBModules.Models;
using MongoDB.Bson;

namespace Dark_Core_Server.Models.File
{
    /// <summary>
    /// 文件引用文档
    /// </summary>
    public class FileReferenceDocument : DocumentUnit
    {
        /// <summary>
        /// 文件ID
        /// </summary>
        public ObjectId FileId { set; get; }
        /// <summary>
        /// 文件虚拟路径
        /// </summary>
        public string[] VirtualPaths { set; get; }
        /// <summary>
        /// 文件名称
        /// </summary>
        public string FileName { set; get; }
        /// <summary>
        /// 文件扩展名
        /// </summary>
        public string FileExtenstion { set; get; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public ObjectId UserId
        {
            set;
            get;
        }
        /// <summary>
        /// 文件等级
        /// </summary>
        public int Level { set; get; }

        public static FileReferenceDocument Empty => new FileReferenceDocument() { id = ObjectId.Empty };
    }
}
